package com.zimin.cloud.user.biz.impl;

import com.zimin.cloud.mine.pojo.user.view.AuthRoleElementOperationVO;
import com.zimin.cloud.mine.pojo.user.view.AuthRoleVO;
import com.zimin.cloud.user.biz.IAuthRoleBiz;
import com.zimin.cloud.user.biz.IAuthRoleElementOperationBiz;
import com.zimin.cloud.user.pojo.entity.AuthRole;
import com.zimin.cloud.user.service.impl.AuthRoleServiceImpl;
import com.zimin.common.annotation.Biz;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
import java.util.Set;


/**
 * <p>
 * 权限控制--角色表 业务对象
 * </p>
 *
 * @author zimin
 * @since 2022-06-14 15:53
 */
@Biz("authRoleBiz")
public class AuthRoleBizImpl extends AuthRoleServiceImpl implements IAuthRoleBiz {

    @Autowired
    private IAuthRoleElementOperationBiz authRoleElementOperationBiz;


    @Override
    public List<AuthRoleElementOperationVO> getRoleElementOperationList(Set<String> roleIdSet) {
        return authRoleElementOperationBiz.getRoleElementOperationList(roleIdSet);
    }

    @Override
    public AuthRoleVO getRoleByCode(String code) {
        return getOne(lambdaQuery().eq(AuthRole::getCode,code),AuthRoleVO.class);
    }
}
